<%-- 
    Document   : view
    Created on : Nov 16, 2014, 2:45:47 PM
    Author     : Hai
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <link href="Theme/css/Menu.css" rel="stylesheet" type="text/css"/>
        <title>View Page</title>
    </head>
    <body>
        <%@include file="header.jsp" %>
        <div>
            <%  String sTable = request.getParameter("where");
                if (!sTable.equals("thuhoach")) {
                    String id = request.getParameter("id");
                    String data = Database.GetData.Table(sTable, id);

                    String[] col = data.split("/r");

                    out.print(""
                            + "<h1>" + Database.GetData.toUTF8(col[1]) + "</h1>"
                            + "<h3>Người viết: " + Database.GetData.id2Name(col[3]) + "</h3>"
                            + "Thời gian: <span>" + (col[4]) + "</span>"
                            + ""
                            + "<div>"
                            + "<p>" + col[2] + "</p>"
                            + "</div>");
                }
            %>

            <div class="fb-follow" data-href=<% out.print('"' + request.getRequestURL().toString() + '"');%> data-colorscheme="dark" data-layout="button_count" data-show-faces="true"></div>
<div class="fb-like" data-href=<% out.print('"' + request.getRequestURL().toString() + '"');%> data-layout="button_count" data-action="like" data-show-faces="true" data-share="true"></div>
            <div class="fb-comments" data-href=<% out.print('"' + request.getRequestURL().toString() + '"');%> data-width="100%" data-numposts="5" data-colorscheme="dark"></div>
            <div id="fb-root"></div>
            <script>(function (d, s, id) {
                    var js, fjs = d.getElementsByTagName(s)[0];
                    if (d.getElementById(id))
                        return;
                    js = d.createElement(s);
                    js.id = id;
                    js.src = "//connect.facebook.net/vi_VN/sdk.js#xfbml=1&ap pId=1529917213913412&version=v2.0";
                    fjs.parentNode.insertBefore(js, fjs);
                }(document, 'script', 'facebook-jssdk'));</script>
        </div>
    </body>
</html>
